Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update svelte to 3.37.0 #152

Merged
merged 23 commits into from
Jun 29, 2021
Merged

fix: update svelte to 3.37.0 #152

merged 23 commits into from
Jun 29, 2021

Conversation

nolanlawson
Copy link
Owner

@nolanlawson nolanlawson commented Jun 27, 2021

Incidentally this fixes #149.

TODO:

  • add tests that this doesn't break older versions of Svelte before the mount/disconnected fixes
  • figure out why svelte 3.38.0 causes one of the tests to break

@nolanlawson
Copy link
Owner Author

Hm, this causes a memory leak because disconnecting the custom element no longer destroys the Svelte component, which means that the ResizeObserver action's destroy() is never called. Interesting puzzle.

@nolanlawson
Copy link
Owner Author

Realized tests for old Svelte probably aren't possible. I think since I'm not going to make Svelte a peerDependency I should just add a note to the readme that if you're using import Picker from 'emoji-picker-element/svelte' then you should make sure it's a roughly compatible Svelte version.

@nolanlawson
Copy link
Owner Author

The failed test in Svelte 3.38.0 is due to changing the order of items in a keyed each block, so it looks like the same issue as sveltejs/svelte#6444

Svelte 3.38.0 also seems to increase the code side a fair amount, apparently due to hydration code being added, even though the component is not hydratable. Seems due to: sveltejs/svelte@10e3e3d

@nolanlawson
Copy link
Owner Author

I filed a bug about the size increase: sveltejs/svelte#6462

Due to that and the keyed each bug, we'll probably want to hold off on updating to Svelte 3.38.0+ for now.

@nolanlawson nolanlawson merged commit 50ac48d into master Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Picker cannot be re-inserted into the DOM
1 participant